package DataModel;

import Interfaces.SortableElements;

/**
 * This class represents a tupel. It is used as infromation holder for position
 * pairs of {@link Feature}s.
 * 
 * @author Stefan Lorenz<br>
 * <br>
 *         26.11.2012
 */
public class Tupel implements SortableElements {
    private int start;
    private int stop;

    /**
     * Constructor of an Tupel of two values
     * 
     * @param start
     *            first value of the tupel
     * @param stop
     *            second value of the tupel
     */
    public Tupel(int start, int stop) {
	this.setStart(start);
	this.setStop(stop);
    }

    /**
     * Constructor of an empty tupel
     */
    public Tupel() {
    }

    /**
     * Sets the first value of the tupel
     * 
     * @param start
     *            the first value
     */
    public void setStart(int start) {
	this.start = start;
    }

    /**
     * Returns the first value of the tupel
     * 
     * @return the first value of the tupel
     */
    public int getStart() {
	return start;
    }

    /**
     * Sets the second value of the tupel
     * @param stop the second value of the tupel
     */
    public void setStop(int stop) {
	this.stop = stop;
    }


    /* (non-Javadoc)
     * @see Interfaces.SortableElements#getStop()
     */
    public int getStop() {
	return stop;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
	return "Tupel [start=" + start + ", stop=" + stop + "]";
    }

}
